home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / bash / bash_1135 / bash1135.zoo / bash-1.13.5 / lib / glob / Makefile-ST
Encoding:
Makefile  |  1994-03-16  |  3.0 KB  |  104 lines

  1. ## -*-text-*- ######################################################
  2. #                                   #
  3. # Makefile for the GNU Glob Library.                   #
  4. #                                   #
  5. ####################################################################
  6.  
  7. # This Makefile is hand made from a template file, found in
  8. # ../template.  Each library must provide several Makefile
  9. # targets: `all', `clean', `documentation', `install', and
  10. # `what-tar'.  The `what-tar' target reports the names of the
  11. # files that need to be included in a tarfile to build the full
  12. # code and documentation for this library.
  13.  
  14. # Please note that the values for INCLUDES, CC, AR, RM, CP,
  15. # RANLIB, and selfdir are passed in from ../Makefile, and do
  16. # not need to be defined here.
  17. #
  18. # Got this from make -f bash-Makefile:
  19. CFLAGS= -DHAVE_ALLOCA -DHAVE_UID_T -DHAVE_BCOPY -D_BSD_SOURCE \
  20.     -DHAVE_DIRENT -DHAVE_DIRENT_H -DHAVE_STRING_H -DHAVE_VARARGS_H \
  21.     -DHAVE_STRCHR -Datarist -DMiNT -DHAVE_UNISTD_H -DHAVE_LIMITS_H \
  22.     -DHAVE_STDLIB_H -DSHELL -I../.. -I../ \
  23.     -mpcrel -mbaserel -O2 -fomit-frame-pointer
  24. CPPFLAGS=-I. -I./lib/
  25. LDFLAGS=
  26. RANLIB=ar s
  27. AR=ar 
  28. CC=gcc
  29. RM=rm -f
  30. # END OF PARAMETERS
  31. # Here is a rule for making .o files from .c files that doesn't force
  32. # the type of the machine (like -sun3) into the flags.
  33. .c.o:
  34.     $(CC) -c $(CFLAGS) $(INCLUDES) $(LOCAL_DEFINES) $(CPPFLAGS) $*.c
  35.  
  36. # LOCAL_DEFINES are flags that are specific to this library.
  37. # Define -DUSG if you are using a System V operating system.
  38. LOCAL_DEFINES = $(LOCAL_INCLUDES) #-DUSG
  39.  
  40. # For libraries which include headers from other libraries.
  41. LOCAL_INCLUDES = -I../
  42.  
  43. # The name of the library target.
  44. LIBRARY_NAME = glob.olb
  45.  
  46. # The C code source files for this library.
  47. CSOURCES = glob.c fnmatch.c
  48.  
  49. # The header files for this library.
  50. HSOURCES = fnmatch.h
  51.  
  52. OBJECTS = glob.o fnmatch.o
  53.  
  54. # The texinfo files which document this library.
  55. DOCSOURCE = doc/glob.texi
  56. DOCOBJECT = doc/glob.dvi
  57. DOCSUPPORT = doc/Makefile
  58. DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
  59.  
  60. SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
  61.  
  62. SOURCES  = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
  63.  
  64. THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
  65.  
  66. ######################################################################
  67.  
  68. all: $(LIBRARY_NAME)
  69.  
  70. $(LIBRARY_NAME): $(OBJECTS)
  71.     $(RM) -f $@
  72.     $(AR) cq $@ $(OBJECTS)
  73.     $(RANLIB) $@
  74.  
  75. what-tar:
  76.     @for file in $(THINGS_TO_TAR); do \
  77.       echo $(selfdir)$$file; \
  78.     done
  79.  
  80. documentation: force
  81.     (cd doc; make)
  82. force:
  83.  
  84. # The rule for 'includes' is written funny so that the if statement
  85. # always returns TRUE unless there really was an error installing the
  86. # include files.
  87. install:
  88.     -$(MV) $(bindir)/$(LIBRARY_NAME) $(bindir)/$(LIBRARY_NAME)-old
  89.     $(CP) $(LIBRARY_NAME) $(bindir)/$(LIBRARY_NAME)
  90.     if [ -f "$(RANLIB)" ]; then $(RANLIB) -t $(bindir)/$(LIBRARY_NAME); fi
  91.  
  92. clean:
  93.     rm -f $(OBJECTS) $(LIBRARY_NAME)
  94.     (cd doc; make clean)
  95.  
  96.  
  97. ######################################################################
  98. #                                     #
  99. #  Dependencies for the object files which make up this library.     #
  100. #                                     #
  101. ######################################################################
  102.  
  103. fnmatch.o: fnmatch.c fnmatch.h
  104.